import request from "@/utils/request";
//获取员工简单信息
export function getEmployeeSimple() {
  return request({
    url: "api/sys/user/simple",
    method:"get"
  });
}

export function getEmployee(params) {
  return request({
    url: "api/sys/user",
    method: "get",
    params
  })
}
//删除员工
export function delEmployee(id) {
  return request({
    method: "DELETE",
    url: `api/sys/user/${id}`,
  });
}

//新增员工
export function addEmployee(data) {
  return request({
    method: "post",
    url: "/api/sys/user",
    data
  });
}

export function saveUserDetailById(data) {
  return request({
    url: `/api/sys/user/${data.id}`,
    method: "put", // 全量修改
    data,
  });
}

export function assignRoles(data) {
  return request({
    url: "/api/sys/user/assignRoles",
    data,
    method: "put",
  });
}